import React, { Component } from 'react';
import {withRouter} from 'react-router-dom';
class Heade extends Component {
    goBack=()=>{
      this.props.history.goBack()
    }
    goforward=()=>{
        this.props.history.goForward()
    }

    go=()=>{
        this.props.history.go(1)
    }

    render() {
        return (
            <div className="row">
               
            <div className="col-xs-offset-2 col-xs-8">
              <div className="page-header"><h2>React Router Demo</h2></div>
              <button onClick={this.goBack}>goBack</button>
              <button onClick={this.goforward}>forward</button>
              <button onClick={this.go}>go</button>
            </div>
            
          </div>
        );
    }
}

export default withRouter(Heade);